1. Field of the Invention
The invention relates to storage systems.
2. Related Art
One known type of storage system is known as "RAID", in which data is distributed across multiple disk drives and stored so as to be recoverable in the event that one of those disk drives, or one or more of its storage blocks, fails with lost data. To store data for later recovery, RAID systems record data along with parity information, so that data can be recovered from the parity information. For example, in one type of RAID system, a set of five disks is used to record four blocks of data and one block of parity information in a unit known as a "stripe".
One problem which has arisen in the art is that RAID systems which record parity information require computation of parity information quickly and often. For example, operations which write to a stripe require at least one set of parity information to be computed. Computing parity information makes substantial use of the XOR (exclusive-or) function. This can require allocation of substantial computational resources, such as processor cycles, cache locations, and memory access cycles.
One possible technique for computing parity information is to provide software for controlling a processor to compute the XOR function. This technique has several design alternatives, such as those involving attempts to scheduling processor instructions so as to avoid register conflict and unnecessary waiting, and reducing cache misses so as to avoid unnecessary memory transfers and unnecessary waiting by the processor. While this technique achieves the goal of computing parity information, it suffers from the drawbacks that it requires substantial computing resources (processor cycles, cache locations, memory transfers).
Another possible technique for computing parity information is to provide a second processor, with an independent memory, for performing XOR operations. The second processor is coupled to the main memory (that is, memory used by the first processor) using a DMA connection, which retrieves inputs for XOR operations from memory using DMA operations, thus leaving the first processor to perform other tasks. While this technique achieves the goal of computing parity information, it also suffers from the drawbacks that it requires substantial memory transfers and use of the system bus, even while relieving the first processor of some of its burden.
Accordingly, it would be advantageous to provide a method and system for performing XOR operations while consuming fewer computing resources. This advantage is achieved in an embodiment of the invention in which a specialized processor reviews memory and disk accesses as they are transmitted on a system bus, which performs XOR operations, records the results of those XOR operations, and which outputs the results of those XOR operations on processor command.